
import { IsString, IsNumber, IsBoolean, IsDate, IsOptional, IsEnum } from 'class-validator';
import { ApiProperty, OmitType, IntersectionType } from '@nestjs/swagger';
import { PagingDto } from 'src/common/dto/index';
import { CharEnum } from 'src/common/enum/index';


export class BaseProfessionalDto{
	@ApiProperty({required: false , description: '专业ID'})
	@IsOptional()
	@IsNumber()
	proId?: number;

	@ApiProperty({enum: CharEnum, required: false , description: '删除标志'})
	@IsOptional()
	@IsString()
	delFlag?: string;

	@ApiProperty({enum: CharEnum, required: false , description: '状态'})
	@IsOptional()
	@IsString()
	status?: string;

	@ApiProperty({required: false , description: '创建者'})
	@IsOptional()
	@IsString()
	createBy?: string;

	@ApiProperty({required: false , description: '创建时间'})
	@IsOptional()
	@IsString()
	createTime?: string;

	@ApiProperty({required: false , description: '更新者'})
	@IsOptional()
	@IsString()
	updateBy?: string;

	@ApiProperty({required: false , description: '更新时间'})
	@IsOptional()
	@IsString()
	updateTime?: string;

	@ApiProperty({required: false , description: '备注'})
	@IsOptional()
	@IsString()
	remark?: string;

	@ApiProperty({required: false , description: '专业名称'})
	@IsOptional()
	@IsString()
	proIntroduce?: string;

	@ApiProperty({required: false , description: '专业负责人'})
	@IsOptional()
	@IsString()
	proManager?: string;

	@ApiProperty({required: false , description: '专业名称'})
	@IsOptional()
	@IsString()
	proName?: string;

	@ApiProperty({required: false , description: '专业名称'})
	@IsOptional()
	@IsString()
	proCode?: string;

	@ApiProperty({required: false , description: '负责人介绍'})
	@IsOptional()
	@IsString()
	proManagerIntro?: string;

	@ApiProperty({required: false , description: '负责人电话'})
	@IsOptional()
	@IsString()
	proManagerPhone?: string;

}

export class CreateProfessionalDto extends OmitType(BaseProfessionalDto, [ 'proId', 'delFlag', 'createBy', 'createTime']){}

export class UpdateProfessionalDto extends OmitType(BaseProfessionalDto, [ 'delFlag', 'createBy', 'createTime']){}

export class QueryProfessionalDto extends IntersectionType( BaseProfessionalDto, PagingDto){}

export class ListProfessionalDto  extends OmitType(BaseProfessionalDto, [ 'delFlag', 'createBy', 'createTime', 'updateBy', 'updateTime']) {}
